package com.wxcms.domain;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.sql.Timestamp;

import me.chanjar.weixin.cp.bean.WxCpDepart;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;

//DepEquipments
@SuppressWarnings("serial")
public class DepEquipments implements Serializable  {
	 
	 

	private String  puid; 
	
	private String depid;
	private int onoff;
	private int isforce;
	private int period ;
	private String glocation;
	private String name;
	private long lastTime ;
	private long pushTime ;
	private String puinfoIndex;
	private String corpId;
	private String prname;
	private String  onlinestatus; 
	public DepEquipments(){
		lastTime=0  ;
		pushTime=0 ;
		 
	}
	  @Override
	  public String toString() {
	    return "DepEquipments{" +
	        "puid=" + puid +
	        ", depid='" + depid +  
	        ", onoff=" + onoff +
	        ", isforce=" + isforce +
	        ", period=" + period +
	        ", glocation=" + glocation +
	        ", name=" + name +
	        ", puinfoIndex=" + puinfoIndex +
	        ", corpId=" + corpId +
	        ", onlinestatus=" + onlinestatus +
	        '}';
	  }
	  
 
	  public static WxCpDepart fromJson(String json) {
		    return WxCpGsonBuilder.create().fromJson(json, WxCpDepart.class);
		  }

		  public String toJson() {
		    return WxCpGsonBuilder.create().toJson(this);
		  }

	  
		public String getPuid() {
			return puid;
		}
		public void setPuid(String puid) {
			this.puid = puid;
		}
		
	public String getDepid() {
		return depid;
	}
	public void setDepid(String depid) {
		this.depid = depid;
	}
	public int getOnoff() {
		return onoff;
	}
	public void setOnoff(int onoff) {
		this.onoff = onoff;
	}
	public int getPeriod() {
		return period;
	}
	public void setPeriod(int period) {
		this.period = period;
	}
	public String getGlocation() {
		return glocation;
	}
	public void setGlocation(String glocation) {
		this.glocation = glocation;
	}
	public String getOnlinestatus() {
		return onlinestatus;
	}
	public void setOnlinestatus(String onlinestatus) {
		this.onlinestatus = onlinestatus;
	}

 

	
	 
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public long getLastTime() {
		return lastTime;
	}
	public void setLastTime(long lastTime) {
		this.lastTime = lastTime;
	}
	public long getPreLastTime(){
	 
		return (lastTime/1000 -period-1);
	 
	}
	public int getIsforce() {
		return isforce;
	}
	public void setIsforce(int isForce) {
		this.isforce = isForce;
	}
	public long getPushTime() {
		return pushTime;
	}
	public void setPushTime(long pushTime) {
		this.pushTime = pushTime;
	}
	public String getPuinfoIndex() {
		return puinfoIndex;
	}
	public void setPuinfoIndex(String puinfoIndex) {
		this.puinfoIndex = puinfoIndex;
	}
	public String getCorpId() {
		return corpId;
	}
	public void setCorpId(String corpId) {
		this.corpId = corpId;
	}
	public String getPrname() {
		return prname;
	}
	public void setPrname(String prname) {
		this.prname = prname;
	}
	 
	
	
 
	
}
